﻿using B.MES.Customer.Domain;
using B.MES.Customer.Domain.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.MES.Customer.Application.IApplication
{
    /// <summary>
    /// 物料服务层
    /// </summary>
    public interface IMaterialApplication:IBaseApplication<Material>
    {
        /// <summary>
        /// 带分页的物料查询
        /// </summary>
        /// <param name="pageIndex">页码</param>
        /// <param name="pageSize">每页大小</param>
        /// <param name="matCode">物料编号</param>
        /// <param name="matName">物料名称</param>
        /// <param name="matModel">规格型号</param>
        /// <param name="matBrand">品牌</param>
        /// <returns>分页查询结果</returns>
        PageApiResut<MaterialDTO> GetMaterials(int pageIndex, int pageSize, string? matCode = null, string? matName = null, string? matModel = null, string? matBrand = null);
        /// <summary>
        /// 绑定物料属性表的下拉框
        /// </summary>
        /// <returns>返回物料属性表数据</returns>
        List<Matattribute> GetMatattrShow();
        /// <summary>
        /// 绑定物料类别表的下拉框
        /// </summary>
        /// <returns>返回物料类别表数据</returns>
        List<MatTypeinfo> GetMatTypeinfoShow();
        /// <summary>
        /// 绑定物料单位表的下拉框
        /// </summary>
        /// <returns>返回物料单位表数据</returns>
        List<MatUnitInfo> GetMatUnitInfoShow();
        /// <summary>
        /// 添加物料表
        /// </summary>
        /// <param name="material">需要添加的物料数据</param>
        /// <returns>受影响的行数</returns>
        int AddMaterial(Material material);
    }
}
